import { createRouter, createWebHistory, createWebHashHistory } from 'vue-router'

import home from '../pages/Home.vue'
import login from '../pages/Login.vue'
import menu from '../pages/Menu.vue'
import shi from '../pages/shi/Shi.vue'
import shiDetail from '../pages/shi/ShiDetail.vue'

let router = createRouter({
    history: createWebHashHistory(),
    routes: [
        { path: '/', redirect: '/home' },
        { name: 'home', path: '/home', component: home },
        { name: 'login', path: '/login', component: login },
        {
            name: 'menu', path: '/menu', component: menu, children: [
                { name: 'shi', path: '/shi', component: shi },
                { name: 'shiDetail', path: '/shiDetail', component: shiDetail },
            ]
        },
    ]
})

export default router